<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            height: 50px;
            width: 500px;
            border: 1px solid pink;
            text-align: center;
            line-height: 50px;
            margin: 10px auto;
        }
    </style>
</head>

<body>
    <div></div>
    <script>
        const div = document.querySelector('div')
        const date = new Date()
        div.innerHTML = `${date.toLocaleString()}`
        setInterval(function () {
            const date = new Date()
            div.innerHTML = `${date.toLocaleString()}`
            // div.innerHTML = `${ date.toLocaleDateString() }`
        }, 1000)
    </script>
</body>

</html>